# -*- cperl -*-
{
    my @temp_files = (
        'normal-1', 'normal-2', 'order-only-1', 'order-only-2',
        'order-only-nonexisted', 'foo', 'bar'
    );
    do { ( unlink or die "unlink: $_. $!" ) if -f } for ( @temp_files );
    unlink "$file.log" if -f "$file.log";

    my $runner_command = $smart . ' -f ' . $file . " 2>>$file.log";
    #my $runner_command = 'make' . ' -f ' . $file;
    my @temp_result;

    @temp_result = `$runner_command`;
    push @result, @temp_result;
    push @result, "====================\n";

    @temp_result = `$runner_command`;
    push @result, @temp_result;
    push @result, "====================\n";

    @temp_result = `$runner_command`;
    push @result, @temp_result;
    push @result, "====================\n";

    system("sleep 1; touch normal-1 order-only-2") == 0 or do {
        push @result, "can't touch files";
        die "can't touch files: $!";
    };
    @temp_result = `$runner_command`;
    push @result, @temp_result;
    push @result, "====================\n";

    do { ( unlink or die "unlink: $_. $!" ) if -f } for ( @temp_files );
    @result = ( "(empty output)" ) unless @result;
    print "";
}
